package com.star.service;

import com.star.dao.bookMapper;
import com.star.pojo.books;

import java.util.List;

public class bookServiceImpl implements bookService {

    private bookMapper bookMapper;

    public void setBookMapper(com.star.dao.bookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    public int addBook(books book) {
        return bookMapper.addBook(book);
    }

    public int deleteBookByID(int id) {
        return bookMapper.deleteBookByID(id);
    }

    public int updateBook(books books) {
        return bookMapper.updateBook(books);
    }


    public List<books> queryAllBooks() {
        return bookMapper.queryAllBooks();
    }

    public books queryBookById(int id) {
        return bookMapper.queryBookById(id);
    }

    public List<books> selectBook(String name) {
        return bookMapper.selectBook(name);
    }


}
